 
<%@page import="doantotnghiep.modelDTO.StaffDTO"%>
<%@page import="doantotnghiep.modelDTO.UserDTO"%>
<%@page import="doantotnghiep.modelDTO.MedicamentDTO"%>
<%@page import="java.util.HashMap"%>
<%@ page language="java" contentType="text/html; charset=UTF-8"
	pageEncoding="UTF-8"%>
<%@taglib prefix="c" uri="http://java.sun.com/jstl/core_rt"%>
<%@taglib uri="http://www.springframework.org/tags/form" prefix="form"%>
<%@page import="java.util.ArrayList"%>
<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">

<html>

<head>
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
<title>Thêm lô hàng </title>

<link rel="stylesheet" type="text/css"
	href="<c:url value="/resources/css/table.css" />" />
<link rel="stylesheet" type="text/css"
	href="<c:url value="/resources/css/button.css" />" />
</head>
<body>
 <% HashMap<String, Object> staffModel = (HashMap<String, Object>) request.getAttribute("staffModel");
 		%>	
<div align="center">

		<h1 style="color: BLUE;">THÊM TÀI KHOẢN</h1>
		<br> <br>

		<p style="color: green; font-size: 15px; font-weight: bold;">
		</p>
       <form:form method="POST" commandName="UserDTO" >
		<table border="1">
		<tr>
				<td><form:label path="staffID">Nhân viên:</form:label></td>
				 <td><form:select path="staffID" value="${staffID}">
			           <%
			            if(staffModel!=null){
   					    	 ArrayList<StaffDTO> staffDTOs = (ArrayList<StaffDTO>) staffModel.get("staffDTOs");
   					   		 if(staffDTOs != null){ 
   					         	for (int i = 0; i < staffDTOs.size(); i++) {			 
						   	 %>
				            <option value="<%=staffDTOs.get(i).getId()%>"><%=staffDTOs.get(i).getFullName()%></option>
				           <%}}}%>
						</form:select></td>
					</tr>

			<tr>
				<td><form:label path = "userName">Tên tài khoản:</form:label></td>
				<td><form:input id = "userName" path = "userName" value = "${userName}"></form:input></td>
			</tr>
			<tr>
				<td><form:label path = "passWord">Mật khẩu:</form:label></td>
				<td><form:input id = "password" path = "passWord" value = "${passWord}" /></td>	
			</tr>		
            	<tr>
				<td ><input id="addusersubmit" type="button" value="Thêm" /></td>
				<td ><input id="addusercancel" type="button" value="Hủy" /></td>
			</tr>
			
		 </table>
	     </form:form>

		</div>
</body>
</html>
